import request from '@/utils/request'
import qs from 'qs'
import { jdyadmin } from '@/settings'

/**
 * -------------------------------------------------------
 * ------------------------目录信息------------------------
 * -------------------------------------------------------
 */
// 查询二维码目录信息
export function ewmMulu(data) {
	return request({
		url: `${jdyadmin}/zxingCatalogue/seleteZxingCatalogue`,
		method: 'post',
		data
	})
}

// 新增二维码目录信息
export function addMulu(data) {
	return request({
		url: `${jdyadmin}/zxingCatalogue/addZxingCatalogue`,
		method: 'post',
		data
	})
}

//更新二维码目录管理
export function updateMulu(data) {
	return request({
		url: `${jdyadmin}/zxingCatalogue/updateZxingCatalogue`,
		method: 'post',
		data
	})
}

// 删除二维码目录信息
export function deleteMulu(data) {
	return request({
		url: `${jdyadmin}/zxingCatalogue/deleteUserPermission/${data}`,
		method: 'delete'
	})
}


/**
 * -------------------------------------------------------
 * ---------------------二维码模板信息---------------------
 * -------------------------------------------------------
 */
// 查询二维码模板信息
export function getEwmMuban(data) {
	return request({
		url: `${jdyadmin}/zxingErwei/seleteUserPermission`,
		method: 'post',
		data
	})
}

// 新增二维码模板信息
export function addEwmMuban(data) {
	return request({
		url: `${jdyadmin}/zxingErwei/addUserPermission`,
		method: 'post',
		data
	})
}

// 修改二维码模板信息
export function updateEwmMuban(data) {
	return request({
		url: `${jdyadmin}/zxingErwei/updateUserPermission`,
		method: 'post',
		data
	})
}


// 删除二维码模板信息
export function deleteEwmMuban(id) {
	return request({
		url: `${jdyadmin}/zxingErwei/deleteUserPermission/${id}`,
		method: 'delete'
	})
}


/**
 * -------------------------------------------------------
 * ---------------------二维码使用说明---------------------
 * -------------------------------------------------------
 */
// 查询使用方法信息
export function getUseMothod(data) {
	return request({
		url: `${jdyadmin}/zxingMethod/seleteZxingMethod`,
		method: 'post',
		data
	})
}

// 新增使用方法信息
export function addUseMothod(data) {
	return request({
		url: `${jdyadmin}/zxingMethod/addZxingMethod`,
		method: 'post',
		data
	})
}

// 修改使用方法信息
export function updateUseMothod(data) {
	return request({
		url: `${jdyadmin}/zxingMethod/updateZxingMethod`,
		method: 'post',
		data
	})
}


// 删除使用方法信息
export function deleteUseMothod(id) {
	return request({
		url: `${jdyadmin}/zxingMethod/deleteZxingMethod/${id}`,
		method: 'delete'
	})
}

/**
 * -------------------------------------------------------
 * ---------------------二维码执行标准---------------------
 * -------------------------------------------------------
 */

// 查询二维码执行标准
export function getEwmBiaozhun(data) {
	return request({
		url: `${jdyadmin}/zxingStand/seleteZxingStand`,
		method: 'post',
		data
	})
}

// 新增二维码执行标准
export function addEwmBiaozhun(data) {
	return request({
		url: `${jdyadmin}/zxingStand/addZxingStand`,
		method: 'post',
		data
	})
}

// 修改二维码执行标准
export function updateEwmBiaozhun(data) {
	return request({
		url: `${jdyadmin}/zxingStand/updateZxingStand`,
		method: 'post',
		data
	})
}


// 删除二维码执行标准
export function deleteEwmBiaozhun(id) {
	return request({
		url: `${jdyadmin}/zxingStand/deleteZxingStand/${id}`,
		method: 'delete'
	})
}

/**
 * -------------------------------------------------------
 * ---------------------二维码验证模块---------------------
 * -------------------------------------------------------
 */
export function ewmYanzheng(id) {
	return request({
		url: `${jdyadmin}/ZxingVerify/verify/${id}`,
		method: 'get'
	})
}

// 新增二维码验证图片
export function addYzImg(data) {
	return request({
		url: `${jdyadmin}/zxingVerify/addZxingVerify`,
		method: 'post',
		data
	})
}
// 修改二维码验证图片
export function updateYzImg(data) {
	return request({
		url: `${jdyadmin}/zxingVerify/updateZxingVerify`,
		method: 'post',
		data
	})
}
// 删除二维码验证图片
export function deleteYzImg(id) {
	return request({
		url: `${jdyadmin}/zxingVerify/deleteZxingVerify/${id}`,
		method: 'delete'
	})
}

// 查询二维码验证所对应图片
export function selectYzImg(data) {
	return request({
		url: `${jdyadmin}/zxingVerify/seleteZxingVerify`,
		method: 'post',
		data
	})
}



/**
 * -------------------------------------------------------
 * ---------------自定义验证二维码域名目录-----------------
 * -------------------------------------------------------
 */
// 查询自定义验证二维码域名目录
export function getSelfHttp(data) {
	return request({
		url: `${jdyadmin}/jdyDomain/seleteJdyDomain`,
		method: 'post',
		data
	})
}

// 新增自定义验证二维码域名目录
export function addSelfHttp(data) {
	return request({
		url: `${jdyadmin}/jdyDomain/addJdyDomain`,
		method: 'post',
		data
	})
}

// 修改自定义验证二维码域名目录
export function updateSelfHttp(data) {
	return request({
		url: `${jdyadmin}/jdyDomain/updateJdyDomain`,
		method: 'post',
		data
	})
}


// 删除自定义验证二维码域名目录
export function deleteSelfHttp(id) {
	return request({
		url: `${jdyadmin}/jdyDomain/deleteJdyDomain/${id}`,
		method: 'delete'
	})
}

/**
 * -------------------------------------------------------
 * ------------------用户模板生成的二维码-------------------
 * -------------------------------------------------------
 */
// 查询用户模板生成的二维码
export function getUserCreateEwm(data) {
	return request({
		url: `${jdyadmin}/zxingErweim/seleteUserPermission`,
		method: 'post',
		data
	})
}

// 根据md查询
export function searchMd(id) {
	return request({
		url: `${jdyadmin}/zxingErweim/seleteOneZxingErweim/${id}`,
		method: 'get'
	})
}

// 新增用户模板生成的二维码
export function addUserCreateEwm(data) {
	return request({
		url: `${jdyadmin}/zxingErweim/addUserPermission`,
		method: 'post',
		data
	})
}

// 修改用户模板生成的二维码
export function updateUserCreateEwm(data) {
	return request({
		url: `${jdyadmin}/zxingErweim/updateUserPermission`,
		method: 'post',
		data
	})
}


// 删除用户模板生成的二维码
export function deleteUserCreateEwm(id) {
	return request({
		url: `${jdyadmin}/zxingErweim/deleteUserPermission/${id}`,
		method: 'delete'
	})
}


/**
 * -------------------------------------------------------
 * ----------------------净重毛重管理----------------------
 * -------------------------------------------------------
 */
// 净重搜索
export function getJingzhong(data) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/seleteZxingSuttle`,
		method: 'post',
		data
	})
}

// 净重添加
export function addJingzhong(data) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/addZxingErweimakg`,
		method: 'post',
		data
	})
}

// 净重修改
export function updateJingzhong(data) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/updateZxingErweimakg`,
		method: 'post',
		data
	})
}

// 净重删除
export function deleteJingzhong(id) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/deleteZxingErweimakg/${id}`,
		method: 'delete'
	})
}


/**
 * ------------------毛重-------------------------
 */
// 毛重搜索
export function getMaozhong(data) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/seletekg`,
		method: 'post',
		data
	})
}

// 毛重添加
export function addMaozhong(data) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/addkg`,
		method: 'post',
		data
	})
}

// 毛重修改
export function updateMaozhong(data) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/updatekg`,
		method: 'post',
		data
	})
}

// 毛重删除
export function deleteMaozhong(id) {
	return request({
		url: `${jdyadmin}/zxingErweimakg/deletekg/${id}`,
		method: 'delete'
	})
}


/**
 * -------------------------------------------------------
 * ----------------------用户模板目录----------------------
 * -------------------------------------------------------
 */
export function getYonghuMoban(data) {
	return request({
		url: `${jdyadmin}/zxingCatalogue/addZxingCatalogueTemplate`,
		method: 'post',
		data
	})
}


/**
 * -------------------------------------------------------
 * ----------------------获取输入记录----------------------
 * -------------------------------------------------------
 */
// 毛重搜索
export function addPhHistory(data) {
	return request({
		url: `${jdyadmin}/zxingErweim/addseleteErweimpihao`,
		method: 'GET',
		params: data
	})
}

// 毛重添加
export function addTimeHistory(data) {
	return request({
		url: `${jdyadmin}/zxingErweim/addseleteErweimriqi`,
		method: 'GET',
		params: data
	})
}

// 毛重搜索
export function getPhHistory(data) {
	return request({
		url: `${jdyadmin}/zxingErweim/seleteErweimpihao`,
		method: 'GET'
	})
}

// 毛重添加
export function getTimeHistory(data) {
	return request({
		url: `${jdyadmin}/zxingErweim/seleteErweimriqi`,
		method: 'GET'
	})
}
 